#This class implements several logical containers, a complete list follows:

#Stack
#Queue

#Author: Sam Robertson
#Modified: 1/13/2012

#The classic first-in-last-out container
class Stack
  def initialize
    @@stack = []  
  end  
  def push(item)
    @@stack.push(item)
  end
  def pop(item)
    @@stack.pop
  end
  def size
    @@stack.length
  end
  def peek
    @@stack.last
  end
end

#The classic first-in-first-out container
class Queue
  def initialize
    @@queue = []
  end
  def push(item)
    @@stack.push(item)
  end
  def poll(item)
    @@stack.shift
  end
  def size
    @@stack.length
  end
  def peek
    @@stack.first
  end
end